package ru.spbu.mm.diploma.common.facade;

import ru.spbu.mm.diploma.common.entity.Project;
import ru.spbu.mm.diploma.server.dao.DAOBean;

import java.util.List;

/**
 *
 */
public class ProjectFacadeImpl implements IProjectFacade {
    private static ProjectFacadeImpl instance = new ProjectFacadeImpl();

    public static ProjectFacadeImpl getInstance() {
        return instance;
    }

    private ProjectFacadeImpl() {
    }

    public Project getProjectWithId(Integer id) {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }

    public Project getProjectWithName(String name) {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }

    public void addProject(Project p) {
        DAOBean.projectDAO.addProject(p);
    }

    public void updateProject(Project p) {
        DAOBean.projectDAO.updateProject(p);
    }

    public Project deleteProject(Project p) {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }

    public List<Project> getProjects() {
        return DAOBean.projectDAO.getProjects();
    }
}
